-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the testing period for aggregated consumption #5601
Fix the testing period for aggregated consumption #5601
Conversation
Ran the tests. This fixes it. It was probably Feb with 28 days that threw us off... bors r+ |
Build failed: |
bors try |
tryBuild failed: |
I wonder if this is because April only has 30 days? When I look at the failure, I see (in depot.js:106) that the expected values are: When I checked the CMM calculations they are correct based on the difference in the value of 'sum_stock_out_days'. So I think this is the key to the problem. |
I was able to git this test working by converting the calculations of expiration dates based on DAY's (not MONTH's) in the stock SQL and updating the depot test file. I modified these files (renamed, attached) @jniles and @mbayopanda : Please try these files and see if they work on your system. If so, this seems like the correct approach since it guarantees the same number of days for the tests/expirations/etc regardless of whether months have different numbers of days. However I think I may something may need further fixing because the "head_days" changed from 0 to 29 for the tests. |
@jmcameron what is your environment configuration (MySQL version, Node version, OS) because the integration tests passed on my configuration (MySQL 5.7 and 8, Node 16.0.0, Windows 10. You're right Sir, the |
The tests works correctly now on my machine 👍🏽 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Great fix @jmcameron
bors r+
Build succeeded: |
This PR fixes issue #5600
Close #5600